#include <iostream>

using namespace std;

int main(){
    int a,b,c,maxx,cha,jg=0;
    while (cin>>a>>b>>c){
        maxx = max(a,b);
        cha = max(a,b)-min(a,b);
        if(cha>c){
           jg = (c+min(a,b))*2;
        } else{
           jg = maxx*2+(c-cha)/2*2;
        }
        cout<<jg<<endl;
    }
}